<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>酷妈妈商城</title>
</head>
<body>
	<c:if test="${empty loginUser}">
		<h2>
			您还未登录，去<a href="login.jsp">登录!</a> 还没有账号，<a href="regist.jsp">赶快注册</a>
		</h2>
	</c:if>

	<c:if test="${not empty loginUser}">
		<h5>欢迎您${loginUser.username}，您的角色是：${loginUser.role=='user'?"商城用户":"管理员" }</h5>
		<h5>
			<a href="logout.jsp">注销</a>
		</h5>
	</c:if>


	<a href="regist.jsp">用户注册</a>
	<a href="login.jsp">用户登陆</a>
	<a href="add_product.jsp">添加商品</a>
	<a href="ListProductServlet">查看商品列表</a>
	<a href="detail_product.jsp">查看商品详情</a>
	<a href="cart.jsp">购物车</a>
	<a href="listOrders">我的订单</a>
	<a href="<%=basePath %>viewRank">查看榜单</a>
	<a href="pay.jsp">在线支付</a>
	<a href="login.jsp">用户登陆</a>
	
</body>
</html>